package com.woniuxy.config;

import com.woniuxy.util.EnhancedSnowFlake;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.redis.core.RedisTemplate;

@Configuration
public class SnowFlakeConfig {
    @Bean
    public EnhancedSnowFlake enhancedSnowFlake(RedisTemplate<String, Long> redisTemplate) {
        return new EnhancedSnowFlake(1L, redisTemplate); // 数据中心 ID=1
    }
}